<#assign ctx="${request.contextPath}" />
<#assign shiro=JspTaglibs["/WEB-INF/taglib/shiro.tld"] />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="${ctx}/static/css/style.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/static/css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${ctx}/static/js/jquery.js"></script>
<script type="text/javascript" src="${ctx}/static/js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="${ctx}/static/js/select-ui.min.js"></script>
<script type="text/javascript" src="${ctx}/static/editor/kindeditor.js"></script>

<script type="text/javascript">
    KE.show({
        id : 'content7',
        cssPath : './index.css'
    });
</script>
  
</head>

<body>

	<div class="place">
	    <span>位置：</span>
	    <ul class="placeul">
		    <li><a href="#">首页</a></li>
		    <li><a href="#">系统设置</a></li>
	    </ul>
    </div>
    <div class="formbody">
	    <div id="usual1" class="usual"> 
		  	<div id="tab2" class="tabson">
		  		<input type="hidden" name="errorCode" id="errorCode" value="${errorCode}"/>
		  		<input type="hidden" name="errorMessage" id="errorMessage" value="${errorMessage}"/>
			    <form action="${ctx}/user/index" method="post" id="form">
				    <ul class="seachform">
					    <li><label>姓名</label><input name="realName" id="realName" value="${realName}" type="text" class="scinput" /></li>
					    <li><label>手机号</label><input name="mobile" id="mobile" value="${mobile}" type="text" class="scinput" /></li>
					    <li class="add_css"><span><input name="" type="submit" class="btn" value="" id="ser"></span><label for="ser">查询</label></li>
					    <li class="click add_css"><span><img src="${ctx}/static/images/t01.png"></span>添加</li>
				    </ul>
			    
			    <table class="tablelist">
			    	<thead>
				    	<tr>
					        <th>用户ID</th>
					        <th>用户名</th>
					        <th>真实姓名</th>
					        <th>联系电话</th>
					        <th>是否锁定</th>
					        <th>操作</th>
				        </tr>
			        </thead>
			        <tbody>
			        <#list page.rows as list>
				        <tr>
					        <td>${list.id}</td>
					        <td>${list.userName}</td>
					        <td>${list.realName}</td>
					        <td>${list.mobile}</td>
					        <#if list.locked>
					        	<td>是</td>
					        <#else>
					        	<td>否</td>
					        </#if>
					        <#if list.locked>
					        	<td><a href="${ctx}/user/edit?id=${list.id}" class="tablelink">修改</a>     <a href="${ctx}/user/open?id=${list.id}" class="tablelink"> 解锁</a></td>
					        <#else>
					        	<td><a href="${ctx}/user/edit?id=${list.id}" class="tablelink">修改</a>     <a href="${ctx}/user/delete?id=${list.id}" class="tablelink"> 锁定</a></td>
					        </#if>
				        </tr> 
				     </#list>
			        </tbody>
			    </table>
			   <!--  <div class="pagin">
			    	<div class="message">共<i class="blue">1256</i>条记录，当前显示第&nbsp;<i class="blue">2&nbsp;</i>页</div>
			        <ul class="paginList">
			        <li class="paginItem"><a href="javascript:;"><span class="pagepre"></span></a></li>
			        <li class="paginItem"><a href="javascript:;">1</a></li>
			        <li class="paginItem current"><a href="javascript:;">2</a></li>
			        <li class="paginItem"><a href="javascript:;">3</a></li>
			        <li class="paginItem"><a href="javascript:;">4</a></li>
			        <li class="paginItem"><a href="javascript:;">5</a></li>
			        <li class="paginItem more"><a href="javascript:;">...</a></li>
			        <li class="paginItem"><a href="javascript:;">10</a></li>
			        <li class="paginItem"><a href="javascript:;"><span class="pagenxt"></span></a></li>
			        </ul>
			    </div> -->
			    <#include "/page.html"/>
			    </form>
		    </div>  
	       
		</div> 
    </div>
	<div class="tip">
    		<div class="tiptop"><span>返回信息</span><a></a></div>
	      	<div class="tipinfo">
		        <div class="tipright">
			        <p class="errormMssage"></p>
		        </div>
		    </div>
	        <div class="tipbtn">
		        <input name="" type="button"  class="sure" value="确定" />&nbsp;
		        <input name="" type="button"  class="cancel" value="取消" />
        	</div>
    
    </div>
    <script type="text/javascript"> 
	      $("#usual1 ul").idTabs(); 
	</script>
	    
    <script type="text/javascript">
		$('.tablelist tbody tr:odd').addClass('odd');
	</script>
	<script>
		//新增
		$('.click').click(function(){
			 window.location.href =  '${ctx}/user/add';
		});
		$(function(){
			 var errorCode = $("#errorCode").val();
			 var errorMessage = $("#errorMessage").val();
			 if(null != errorCode && errorCode != ""){
				 $(".errormMssage").html(errorMessage);
				 $(".tip").fadeIn(200);
			 }
			 $(".tiptop a").click(function(){
			   	  $(".tip").fadeOut(200);
		   	 });
			
			 $(".sure").click(function(){
			   	  $(".tip").fadeOut(100);
			 });
			
			 $(".cancel").click(function(){
			   	  $(".tip").fadeOut(100);
			 });
		});
	</script>
</body>
</html>
